package com.link2room.optimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/9/1.
 */
@Entity
@Table(name = "marketing_campaigns_detail", catalog = "")
@DynamicInsert
public class MarketingCampaignsDetail extends BaseEntity {
    public enum MarketingCampaignsDetail_{
        mcCode,mcdCode,mcdName,rmtype,rmtypeName
    }

    /**
     * 活动代码
     */
    private String mcCode;
    /**
     * 产品代码
     */
    private String mcdCode;
    /**
     * 产品名称
     */
    private String mcdName;
    private String mcdNameEn;
    /**
     * 房型代码
     */
    private String rmtype;

    private String rmtypeName;
    private String rmtypeNameEn;

    private Integer setNum;

    @Basic
    @Column(name = "mc_code", nullable = false, length = 64)
    public String getMcCode() {
        return mcCode;
    }

    public void setMcCode(String mcCode) {
        this.mcCode = mcCode;
    }

    @Basic
    @Column(name = "mcd_code", nullable = false, length = 64)
    public String getMcdCode() {
        return mcdCode;
    }

    public void setMcdCode(String mcdCode) {
        this.mcdCode = mcdCode;
    }

    @Basic
    @Column(name = "mcd_name", nullable = false, length = 64)
    public String getMcdName() {
        return mcdName;
    }

    public void setMcdName(String mcdName) {
        this.mcdName = mcdName;
    }

    @Basic
    @Column(name = "mcd_name_en", nullable = true, length = 64)
    public String getMcdNameEn() {
        return mcdNameEn;
    }

    public void setMcdNameEn(String mcdNameEn) {
        this.mcdNameEn = mcdNameEn;
    }

    @Basic
    @Column(name = "rmtype_name_en", nullable = true, length = 32)
    public String getRmtypeNameEn() {
        return rmtypeNameEn;
    }

    public void setRmtypeNameEn(String rmtypeNameEn) {
        this.rmtypeNameEn = rmtypeNameEn;
    }

    @Basic
    @Column(name = "rmtype", nullable = false, length = 32)
    public String getRmtype() {
        return rmtype;
    }

    public void setRmtype(String rmtype) {
        this.rmtype = rmtype;
    }

    @Basic
    @Column(name = "rmtype_name", nullable = false, length = 32)
    public String getRmtypeName() {
        return rmtypeName;
    }

    public void setRmtypeName(String rmtypeName) {
        this.rmtypeName = rmtypeName;
    }

    @Basic
    @Column(name = "set_num", nullable = true)
    public Integer getSetNum() {
        return setNum;
    }

    public void setSetNum(Integer setNum) {
        this.setNum = setNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MarketingCampaignsDetail that = (MarketingCampaignsDetail) o;

        if (mcCode != null ? !mcCode.equals(that.mcCode) : that.mcCode != null) return false;
        if (mcdCode != null ? !mcdCode.equals(that.mcdCode) : that.mcdCode != null) return false;
        if (mcdName != null ? !mcdName.equals(that.mcdName) : that.mcdName != null) return false;
        if (rmtype != null ? !rmtype.equals(that.rmtype) : that.rmtype != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mcCode != null ? mcCode.hashCode() : 0;
        result = 31 * result + (mcdCode != null ? mcdCode.hashCode() : 0);
        result = 31 * result + (mcdName != null ? mcdName.hashCode() : 0);
        result = 31 * result + (rmtype != null ? rmtype.hashCode() : 0);
        return result;
    }
}
